<?php
	// service-log.php
	
	define('LOG_FILE', 'service-log.txt');
	
	// Function for logging message.
	function setLog($message) {
		$message = '[' . date("Y-m-d H:i:s") . '] ' . $message;
		file_put_contents(dirname(__FILE__) . '/' . LOG_FILE, "{$message}\n", FILE_APPEND);
	}	
	
	// Function for reset logging message.
	function resetLog() {
		unlink(dirname(__FILE__) . '/' . LOG_FILE);
	}
	
	// End of file